<?php
use Phalcon\Mvc\Router;
$router = new Router();
$router->add(
    "/",
    array(
        'namespace'  => 'B2c\Controllers',
        'controller' => 'site',
        'action'     => 'index'
    )
);   
$router->add(
    "/b2c/",
    array(
        'namespace'  => 'B2c\Controllers',
        'controller' => 'site',
        'action'     => 'index'
    )
); 
$router->add(
    "/wap/",
    array(
        'namespace'  => 'Wap\Controllers',
        'controller' => 'wap',
        'action'     => 'index'
    )
); 

//添加Admin 命名空间路由
$router->add(
    '/b2c/:controller/:action',
    array(
        'namespace'  => 'B2c\Controllers',
        'controller' => 1,
        'action'     => 2,
    )
);
$router->add(
    '/b2c/:controller/:action/:params',
    array(
        'namespace'  => 'B2c\Controllers',
        'controller' => 1,
        'action'     => 2,
        "params"     => 3,
    )
);

 //添加Admin 命名空间路由
$router->add(
    '/wap/:controller/:action',
    array(
        'namespace'  => 'Wap\Controllers',
        'controller' => 1,
        'action'     => 2,
    )
);
$router->add(
    '/wap/:controller/:action/:params',
    array(
        'namespace'  => 'Wap\Controllers',
        'controller' => 1,
        'action'     => 2,
        "params"     => 3,
    )
);   
return $router;